<template>
	<view class="container">
		
	</view>
</template>
<style>
</style>
<script>
	export default {
		data() {
			return {
				id:0,
				code:'',
				url: getApp().globalData.url,
				static:getApp().globalData.static
			}
		},
		onLoad(e) {
			this.id = e.order_id;
			var order_id = uni.getStorageSync("order_id");
			if(order_id!='')
			{
				this.id = order_id;
			}
			var that = this;
			//#ifdef H5
			this.code = this.getUrlParam('code');
			this.initialize();
			//#endif
		},
		onShow(){
		},
		methods: {
			getUrlParam:function(name) {
				var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
				var r = window.location.search.substr(1).match(reg);
				if (r != null) return unescape(r[2]); return null;
			},
			initialize:function()
			{
				uni.setStorageSync("code",this.code);
				uni.setStorageSync("switchs",1);
				// uni.setStorageSync("order_id",this.id);
				location.href = "/wap/order?code="+this.code+"&order_id="+this.id;
				// uni.navigateTo({
				// 	url:'/pages/mall/order',
				// 	success: (res) => {
				// 		if(res.errMsg=="navigateTo:ok")
				// 		{
				// 			window.location.reload(true);
				// 		}
				// 	}
				// })
				// location.href = "https://zhangjie.jdmuguzhid.com/wap/?#/pages/mall/order";
			}
		}
	}
</script>